#pragma once

namespace SOUI {
class PasswordDlg : public SHostDialog
{
public:
	PasswordDlg(SStringT strTitle, bool bPassword);
	~PasswordDlg();

	virtual void EndDialog(INT_PTR nResult);
	void OnClose();

	BOOL OnInitDialog(HWND wndFocus, LPARAM lInitParam);
	SStringT GetPassWord();
	BOOL GetIsKeepPassword();

protected:
	EVENT_MAP_BEGIN()
		EVENT_NAME_COMMAND(L"btn_close", OnClose)
		EVENT_ID_COMMAND(IDOK, OnOK)
		EVENT_ID_COMMAND(IDCANCEL, OnCancel)
		
		
	EVENT_MAP_END()


	BEGIN_MSG_MAP_EX(CMainDlg)
		MSG_WM_INITDIALOG(OnInitDialog)
		CHAIN_MSG_MAP(SHostWnd)
	END_MSG_MAP()

private:
	SStringT m_strPassWord;
	SStringT m_strTitle;
	BOOL m_bKeepPassword;
	BOOL m_bPassword;
};
}
